<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <link rel="stylesheet" href="./css/style.css">
</head>
<body>
    <div class="main">
        <img src="./image/57b280b496dee47507111c56NRN73rVj.png" alt="二维码">
        <img src="./image/line_dd0b706.png" alt="条形扫描">
    </div>

    <div class="bg">
        <div class="code">
            <img src="./image/line_dd0b705.png" alt="条形扫描">
            <img src="./image/57b280b496dee47507111c56NRN73rVj.png" alt="二维码" class="icon-code">
            <a href="https://yys.163.com/zmb/" class="btn-pc"></a>
        </div>
        <a href="javascrit:;" 
        class="btn" 
        style="display:block" 
        onclick="BtnClick()"
        id="btn-open">
            <span class="arrow"></span>
            展<br>开
        </a>
        <a href="javascrit:;" 
        class="btn" 
        style="display:none" 
        onclick="BtnClick()"
        id="btn-close">
            <span class="arrow"></span>
            收<br>起
        </a>
    </div>
</body>
<script>
    var Bg = document.querySelector(".bg");
    var BtnOpen = document.getElementById("btn-open");
    var BtnClose = document.getElementById("btn-close");
    function BtnClick(){
        console.log(Bg.style.right);
        Bgr = Bg.style.right=="0px"?"-150px":"0px";
        Bg.style.right = Bgr;
        BtnOpen.style.display = Bgr=="-150px"?"block":"none";
        BtnClose.style.display = Bgr=="-150px"?"none":"block";
    }
</script>
</html>